package com.qinggeng.project.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.qinggeng.framework.aspectj.lang.annotation.Excel;
import com.qinggeng.framework.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 商品信息对象 goods
 *
 * @author qinggeng
 * @date 2020-06-15
 */
@Data
public class Goods extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long goodsId;

    /** 所属分类 */
    @Excel(name = "所属分类")
    private Long classifyId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 商品图片 */
    @Excel(name = "商品图片")
    private String goodsImg;

    /** 商品长图 */
    @Excel(name = "商品长图")
    private String goodsLongImg;

    /** 商品内容 */
    @Excel(name = "商品内容")
    private String goodsContent;

    /** 列表图片 */
    @Excel(name = "列表图片")
    private String listImg;

    @Excel(name = "商品短视频")
    private String goodsVideo;
    /** 商品价格 */
    @Excel(name = "商品价格")
    private Double goodsPrice;

    /** 划线价格 */
    @Excel(name = "划线价格")
    private Double linePrice;

    @Excel(name = "拼团价格")
    private Double groupPrice;

    /** 补贴价格 */
    @Excel(name = "补贴价格")
    private String reducePrice;

    @Excel(name = "商品类型")
    private String goodsType;

    /** 商品标签 */
    @Excel(name = "商品标签 ")
    private String goodsMark;

    /** 商品状态 10=下架 20=上架 */
    @Excel(name = "商品状态 10=下架 20=上架")
    private String status;

    /** 添加类型 10=平台 20=商家 */
    @Excel(name = "添加类型 10=平台 20=商家")
    private String addType;

    /** 店铺ID */
    @Excel(name = "店铺ID")
    private Long shopId;

    /** 是否删除 10=未删除 20=已删除 */
    @Excel(name = "是否删除 10=未删除 20=已删除")
    private String delFalg;

    @Excel(name = "排序 默认为1")
    private Long sort;

    @Excel(name = "商品属性")
    private String attributes;

    @Excel(name = "属性名")
    private String attributesName;

    @Excel (name = "商品主类")
    private Long mainCategory;

    //商品类型
    @Excel (name = "商品类型")
    private String classifyName;

    //代理
    @Excel (name = "商品类型")
    private Integer asyncShopId;

    //同城优惠百分比
    @Excel (name = "同城优惠百分比")
    private String proportion;

    @Excel (name = "商品提成百分比")
    private String percent;

    @Excel (name = "商品进价")
    private BigDecimal buyPrice;

    //商品Sku(json格式)
    @Excel (name = "商品Sku(json格式)")
    private Object attrRows;

    //商品搜索栏输入内容
    @Excel (name = "商品搜索栏输入内容")
    private String inputWord;

    @Excel(name = "库存")
    private Integer keepNum;

    //供应商
    @Excel (name = "供应商")
    private String supplier;

    private String supplierDesc;

    //捶数
    private Integer groupNum;

    //预售Id
    private Long presaleId;

    //起售数量
    private String lowNum;

    //规格
    private String spec;

    //人气
    private String popularity;

    private String[] goodsTypes;

    //起售时间

    private Date startDate;

    //提货时间
    private Date pickDate;

    //预购参数
    private String presaleIndex;

    //限制数量
    private Integer limitNum;

    //平台保障
    private String guarantee;

    //置顶
    private String top;

    //商品提成
    private BigDecimal percentage;

    //批发商品id
    private Long wholeGoodsId;


    private Double vipPrice;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("goodsId", getGoodsId())
            .append("classifyId", getClassifyId())
            .append("goodsName", getGoodsName())
            .append("goodsImg", getGoodsImg())
            .append("goodsLongImg", getGoodsLongImg())
            .append("goodsContent", getGoodsContent())
            .append("listImg", getListImg())
            .append("goodsPrice", getGoodsPrice())
            .append("linePrice", getLinePrice())
            .append("goodsMark", getGoodsMark())
            .append("status", getStatus())
            .append("addType", getAddType())
            .append("shopId", getShopId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("delFalg", getDelFalg())
            .append("top", getTop())
            .toString();
    }
}
